﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.Master" AutoEventWireup="true"
    CodeBehind="List.aspx.cs" Inherits="Token.Piker.Web.Admin.NewsAlbum.List" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>校园新闻图片管理</title>
    <style type="text/css">
        .add
        {
            padding-right: 20px;
        }
        .add a
        {
            float: right;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <p class="add">
        <a href="Add.aspx">添加</a></p>
    <p>
    </p>
    <p>
        <label for="txtKeyword">
            请输入事件名称：</label>
        <asp:TextBox ID="txtKeyword" runat="server" Width="200" Height="25"></asp:TextBox>&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btnSearch" runat="server" Text="查询" Width="100" Height="25" OnClick="btnSearch_Click" />
    </p>
    <p></p>
    <asp:GridView ID="gridView" runat="server" Width="98%" CellPadding="3" BorderWidth="1px"
        AutoGenerateColumns="false" PageSize="10" RowStyle-HorizontalAlign="Center">
        <Columns>
            <asp:BoundField DataField="AlbumName" HeaderText="事件" ItemStyle-HorizontalAlign="Center" />
            <asp:BoundField DataField="RealName" HeaderText="添加人" SortExpression="Creator" ItemStyle-HorizontalAlign="Center" />
            <asp:BoundField DataField="CreateTime" HeaderText="添加时间" ItemStyle-HorizontalAlign="Center" />
            <asp:TemplateField HeaderText="活动时间" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <%# Convert.ToDateTime(Eval("ShotTime")).ToLongDateString() %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="ShotPosition" HeaderText="地点" ItemStyle-HorizontalAlign="Center" />
            <asp:TemplateField HeaderText="状态" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <asp:LinkButton ID="lkbChangeState" runat="server" Text='<%# Eval("Flag").ToString() == "0"?"正常":"删除" %>'
                        OnClientClick="return confirm('确定更改？')" OnClick = "ChangeState" CommandArgument = '<%# Eval("ID") %>'></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:HyperLinkField HeaderText="详细" ControlStyle-Width="50" DataNavigateUrlFields="ID"
                DataNavigateUrlFormatString="Show.aspx?id={0}" Text="详细" />
        </Columns>
    </asp:GridView>
    <p>
    </p>
    <webdiyer:AspNetPager ID="pagerList" runat="server" Width="95%" NumericButtonCount="6"
        UrlPaging="true" NumericButtonTextFormatString="[{0}]" CustomInfoHTML=" 第 <font color='red'><b>%CurrentPageIndex%</b></font> 页 共 %PageCount% 页 显示 %StartRecordIndex%-%EndRecordIndex% 条"
        ShowCustomInfoSection="left" FirstPageText="首页" LastPageText="末页" NextPageText="下页"
        PrevPageText="上页" Font-Names="Arial" BackColor="#F8B500" AlwaysShow="true" ShowInputBox="Always"
        SubmitButtonText="跳转" OnPageChanged="pagerList_PageChanged" PageSize="10" ReverseUrlPageIndex="True">
    </webdiyer:AspNetPager>
</asp:Content>
